<template>
<!--  我的订单页面      -->
    <div>
        <!--布局容器Main开始-->
        <el-card >
            <h4 align="left">我的订单</h4>
            <!--分割线-->
            <el-divider></el-divider>
            <!--分割线-->
            <el-table :data="orderArr" >
                <el-table-column type="index" label="编号"
                                 align="center" width="50"></el-table-column>
                <el-table-column prop="bookDate" label="预订时间" value-format="yyyy-MM-dd"
                                 align="center" width="100px" ></el-table-column>
                <el-table-column prop="contactName" label="联系人"
                                 align="center" width="80"></el-table-column>
                <el-table-column prop="contactTel" label="联系电话"
                                 align="center"></el-table-column>
                <el-table-column prop="roomTypeName" label="预订房型"
                                 align="center"></el-table-column>
                <el-table-column prop="visNum" label="随行人数"
                                 align="center" width="80"></el-table-column>
                <el-table-column prop="checkinDate" label="入住时间"
                                 align="center" width="95"></el-table-column>
                <el-table-column prop="checkoutDate" label="离店时间"
                                 align="center" width="95"></el-table-column>
                <el-table-column prop="note" label="备注"
                                 header-align="center" :show-overflow-tooltip="true"></el-table-column>
            </el-table>
        </el-card>
        <!--布局容器Main结束-->
    </div>
</template>

<script>
    export default {
        data() {
            return {
                unLogin:true,
                orderArr:[],
            };
        },
        methods: {
            loadListOrder(){
                console.log("loadListOrder....");
                let url='http://localhost:9080/orders/orderList';
                console.log('url='+url);
                this.axios.get(url).then((response)=>{
                    let responseBody=response.data;
                    if(responseBody.state==20000){
                        this.orderArr=responseBody.data;
                    }
                });
            },
        },
        created() {
            console.log("created开始请求列表数据");

        },
        mounted() {
            console.log("mounted开始请求数据");
            this.loadListOrder();
        }
    }
</script>
